-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated proposal: Use moment defaults and preserve global settings. #257
Conversation
We need better tests.. Build passes, but examples are failing. |
I have high hopes that this might also fix #160 |
Care to look into this? I ported the changes from #228, but it doesn't work for me. |
I'll be traveling over the next week or so, but I can take a crack at it after that! |
weekdaysMin: weekdays | ||
}); | ||
if (this.props.locale) { thisMoment.locale(this.props.locale); } | ||
if (this.props.weekStart) { thisMoment._locale._week.dow = this.props.weekStart; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this line is problematic. Modifying _locale
touches the global locale, which we want to avoid. I found this out by trying to change _locale._weekdaysMin
in one picker and seeing that it affected all pickers.
Found some time to dig into this on the train, and came away feeling that this will be extremely fragile. Supporting all of
|
Replaced by #277 |
Updated version of #228
Should fix #178